package com.example.toolsdemo.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author danyubin
 */
@Data
public class OrderForm {

    private String id;
    @NotBlank(message = "用户id不能为空")
    private String userId;
    private BigDecimal totalPrice;
    @JsonIgnore
    private String receiverName;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
